﻿@model FILSTARTUPS_MOBILE.Models.ViewThreadPost          
@using FILSTARTUPS_MOBILE.Helpers;

@{
    ViewBag.Title = "ViewThread";
    if (User.Identity.IsAuthenticated)
    {
        Layout = "~/Views/Shared/_Layout.cshtml";
    }
    else
    {
        Layout = "~/Views/Shared/_LayoutNonMember.cshtml";
    }
}


@section Nav{
     @foreach(var nav in Model.PageNav)
       {
         <li><a href="../Home/Page?pageidPK=@nav.pageidPK&pagename=@nav.pagename">@nav.pagename</a></li>
       }
}

<h2>ViewThread</h2> 
@Html.ActionLink("Create new Thread", "CreateThread", new { id = ViewBag.forumidFK })
<div class="content-primary">
    <ul data-role="listview" data-inset="true">
 
        <li data-role="list-divider" data-theme="a">Latest Threads </li>
            <li>List of Topics</li>
           @foreach (var thread in Model.forum)
           {
              <li><a href="ViewTopic/@thread.forumthreadidPK"><h3>@thread.forumtitle</h3><p>@Mobile_Helpers.truncate(thread.forumdescription,50)</p></a></li>            
           }
    </ul>
</div>

@*  <li>@Html.ActionLink(thread.forumtitle, "ViewTopic", new { id =thread.forumthreadidPK  })</li>*@